﻿<%@ Page Language="C#" AutoEventWireup="true"
    Inherits="tools_sysrightsmaglist" Codefile="sysrightsmaglist.aspx.cs" %>

<%@ Register Src="~/admin/_root/_controls/ctlNavBar.ascx" TagName="ctlNavBar" TagPrefix="uc1" %>
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN">
<html>
<head>

    <script type="text/javascript">
    var LOCID_DEVERROR_BADTYPE_PICKLIST = "\u6b64\u63a7\u4ef6\u53ea\u63a5\u53d7\u5b57\u7b26\u4e32\u3001\u6574\u6570\u6216\u7a7a\u8f93\u5165\u3002";
    var LOCID_SELECTBOX_BUTTON_ALT = "\u663e\u793a\u9009\u9879\u5217\u8868";
    var LOCID_CLOSE_BUTTON_LABEL = "\u5173\u95ed";
    var LOCID_POPUP_MENU_LABEL = "\x7b0\x7d\u83dc\u5355";
    var LOCID_BOOL_SUPPORTED_VALUES = "\u6b64\u63a7\u4ef6\u53ea\u652f\u6301\u771f\u3001\u5047\u6216\u7a7a\u8f93\u5165\u3002";
    var LOCID_FORM_REQUIRED_BKG_COLOR = "";
    var LOCID_FORM_REQUIRED_ALT = "\u5fc5\u9700";
    var LOCID_COPY_SHORTCUT_ERROR = "\u65e0\u6cd5\u5c06\u6b64\u5feb\u6377\u65b9\u5f0f\u590d\u5236\u5230\u526a\u8d34\u677f\u3002";
    var LOCID_UI_DIR = "LTR";
    var LOCID_AM_DESIGNATOR = "\u4e0a\u5348";
    var LOCID_PM_DESIGNATOR = "\u4e0b\u5348";
    var LOCID_FIRST_WEEK_SELECT = "FirstDay";
    var LOCID_CUSTMSG_TOOMANY_REC = "\u5728\u6267\u884c\u6b64\u64cd\u4f5c\u4e4b\u524d\uff0c\u5fc5\u987b\u53ea\u9009\u62e9\u4e00\u4e2a\u8bb0\u5f55\u3002";
    var LOCID_MERGE_TOOMANY_RECORDS = "\u6bcf\u6b21\u5408\u5e76\u7684\u8bb0\u5f55\u4e0d\u80fd\u8d85\u8fc7 2 \u4e2a\u3002\u8bf7\u5728\u6267\u884c\u6b64\u64cd\u4f5c\u524d\u81f3\u591a\u9009\u62e9\u4e24\u4e2a\u8bb0\u5f55\u3002";
    var LOCID_MRGE_DUPS_TOOMANY_RCRDS = "\u53ea\u6709\u4e00\u4e2a\u8bb0\u5f55\u53ef\u4e0e\u60a8\u7684\u8bb0\u5f55\u5408\u5e76\u3002\u8bf7\u9009\u62e9\u8981\u5408\u5e76\u7684\u8bb0\u5f55\u3002";
    var LOCID_ACTION_NOITEMSELECTED = "\u60a8\u5fc5\u987b\u5148\u9009\u62e9\u4e00\u4e2a\u6216\u591a\u4e2a\u8bb0\u5f55\u624d\u80fd\u6267\u884c\u6b64\u64cd\u4f5c\u3002";
    var LOCID_EMAIL_NORECORDS_MSG = "\u7531\u4e8e\u5f53\u524d\u89c6\u56fe\u6ca1\u6709\u8fd4\u56de\u4efb\u4f55\u8bb0\u5f55\uff0c\u56e0\u6b64\u65e0\u6cd5\u53d1\u9001\u7535\u5b50\u76f4\u90ae\u3002\u60a8\u9700\u8981\u9009\u62e9\u5176\u4ed6\u89c6\u56fe\u6216\u8bb0\u5f55\u624d\u80fd\u53d1\u9001\u7535\u5b50\u76f4\u90ae\u3002";
    var LOCID_RELATIONSHIPS_TOO_MANY = "\u60a8\u6bcf\u6b21\u53ea\u80fd\u4e3a\u4e00\u4e2a\u5ba2\u6237\u521b\u5efa\u4e00\u4e2a\u5173\u7cfb\u3002";
    var LOCID_USERS_TOO_MANY = "\u60a8\u6bcf\u6b21\u53ea\u80fd\u4e3a\u4e00\u4e2a\u7528\u6237\u6267\u884c\u6b64\u64cd\u4f5c\u3002";
    var LOCID_ROLES_TOO_MANY = "\u60a8\u6bcf\u6b21\u53ea\u80fd\u4e3a\u4e00\u4e2a\u5b89\u5168\u89d2\u8272\u6267\u884c\u6b64\u64cd\u4f5c\u3002";
    var LOCID_HETEROGENOUS_TYPES = "\u60a8\u53ea\u80fd\u4e3a\u76f8\u540c\u7c7b\u578b\u7684\u8bb0\u5f55\u6267\u884c\u6b64\u64cd\u4f5c\u3002";
    var LOCID_LOADING_GRID_DATA = "\u6b63\u5728\u52a0\u8f7d...";
    var LOCID_REFRESH_GRID_CANCELLED = "\u5237\u65b0\u5df2\u53d6\u6d88\u3002";
    var LOCID_LOADING_GRID_FAILED = "\u7f51\u683c\u5237\u65b0\u5931\u8d25\u3002";
    var LOCID_GRID_TOO_MANY_RECORDS = "\u60a8\u4e00\u6b21\u53ea\u80fd\u9009\u62e9 \x7b0\x7d \u884c\u3002";
    var LOCID_GRID_TOO_MANY_RECORDS_1 = "\u53ea\u80fd\u9009\u62e9\u4e00\u884c\u3002";
    var LOCID_GRID_SELECT_ALL_KEY = "A";
    var LOCID_MINICAMP_NORECORDS_MSG = "\u7531\u4e8e\u5728\u5f53\u524d\u9875\u9762\u4e0a\u627e\u4e0d\u5230\u4efb\u4f55\u8bb0\u5f55\uff0c\u56e0\u6b64\u65e0\u6cd5\u521b\u5efa\u201c\u5feb\u901f\u5e02\u573a\u6d3b\u52a8\u201d\u3002";
    var LOCID_MINICAMP_TOOMANY_RECORDS = "\u60a8\u4e0d\u80fd\u4e00\u6b21\u4e3a\u591a\u4e2a\u5e02\u573a\u8425\u9500\u5217\u8868\u521b\u5efa\u201c\u5feb\u901f\u5e02\u573a\u6d3b\u52a8\u201d\u3002\u8bf7\u53ea\u9009\u62e9\u4e00\u4e2a\u5e02\u573a\u8425\u9500\u5217\u8868\u3002";
    var LOCID_MINICAMP_CANNOT_RUN = "\u6b64\u9009\u9879\u5728\u5f53\u524d\u89c6\u56fe\u4e0a\u4e0d\u53ef\u7528\u3002\u5e76\u975e\u6240\u6709\u7684\u89c6\u56fe\u90fd\u5c06\u4e0e\u9009\u9879 \u5bf9\u4e8e\u6240\u6709\u9875\u9762\u7684\u5168\u90e8\u8bb0\u5f55 \u534f\u540c\u5de5\u4f5c\u3002\u8bf7\u9009\u62e9\u5176\u4ed6\u89c6\u56fe\u6216\u5176\u4ed6\u201c\u5feb\u901f\u5e02\u573a\u6d3b\u52a8\u201d\u9009\u9879\uff0c\u7136\u540e\u91cd\u8bd5\u3002";
    var LOCID_QC_CANNOT_RUN_ASSO = "\u6b64\u9009\u9879\u4e0d\u53ef\u7528\u4e8e\u5f53\u524d\u89c6\u56fe\u3002\u8bf7\u9009\u62e9\u5176\u4ed6\u5feb\u901f\u5e02\u573a\u6d3b\u52a8\u9009\u9879\uff0c\u7136\u540e\u91cd\u8bd5\u3002";
    var LOCID_MC_CANNOT_RUN_INACTLST = "\u5bf9\u4e8e\u505c\u7528\u7684\u201c\u5e02\u573a\u8425\u9500\u5217\u8868\u201d\u4e0d\u80fd\u8fd0\u884c\u5feb\u901f\u5e02\u573a\u6d3b\u52a8\u3002\u8bf7\u6fc0\u6d3b\u201c\u5e02\u573a\u8425\u9500\u5217\u8868\u201d\u6216\u9009\u62e9\u5176\u4ed6\u201c\u5e02\u573a\u8425\u9500\u5217\u8868\u201d\uff0c\u7136\u540e\u91cd\u8bd5\u3002";
    var LOCID_MC_WINDOW_WIDTH = "700";
    var LOCID_MC_WINDOW_HEIGHT = "570";
    var LOCID_MC_SELECTION_SELECTED = "\u5bf9\u4e8e\u9009\u5b9a\u8bb0\u5f55";
    var LOCID_MC_SELECTION_ALLONPAGE = "\u5bf9\u4e8e\u5f53\u524d\u9875\u9762\u7684\u5168\u90e8\u8bb0\u5f55";
    var LOCID_MC_SELECTION_ALL = "\u5bf9\u4e8e\u6240\u6709\u9875\u9762\u7684\u5168\u90e8\u8bb0\u5f55";
    var LOCID_RESET_DATA_FILTERS = "\u662f\u5426\u786e\u5b9e\u8981\u91cd\u7f6e\u6570\u636e\u7b5b\u9009\u5668\x3f \u8fd9\u5c06\u8986\u76d6\u6240\u6709\u73b0\u6709\u7684\u6570\u636e\u7b5b\u9009\u5668\u3002\u82e5\u8981\u7ee7\u7eed\uff0c\u8bf7\u5355\u51fb\u201c\u786e\u5b9a\u201d\u3002";
    var LOCID_DEDUPE_NORECORDS_MSG = "\u7531\u4e8e\u5f53\u524d\u9875\u4e0a\u627e\u4e0d\u5230\u4efb\u4f55\u8bb0\u5f55\uff0c\u56e0\u6b64\u672a\u68c0\u6d4b\u5230\u91cd\u590d\u9879\u3002";
    var LOCID_DEDUPE_CANNOT_RUN_ASSO = "\u5f53\u524d\u7684\u89c6\u56fe\u4e0d\u80fd\u4f7f\u7528\u6b64\u9009\u9879\u3002\u8bf7\u53e6\u9009\u522b\u7684\u91cd\u590d\u68c0\u6d4b\u9009\u9879\u5e76\u91cd\u8bd5\u3002";
    var LOCID_DEDUPE_CANNOT_RUN = "\u5f53\u524d\u7684\u89c6\u56fe\u4e0d\u80fd\u4f7f\u7528\u6b64\u9009\u9879\u3002\u5e76\u975e\u6240\u6709\u7684\u89c6\u56fe\u5747\u53ef\u5229\u7528\u5bf9\u4e8e\u6240\u6709\u9875\u9762\u7684\u5168\u90e8\u8bb0\u5f55\u9009\u9879\u3002\u8bf7\u53e6\u9009\u522b\u7684\u89c6\u56fe\u6216\u8005\u522b\u7684\u91cd\u590d\u68c0\u6d4b\u9009\u9879\uff0c\u7136\u540e\u91cd\u8bd5\u3002";
    var LOCID_DEDUPE_WINDOW_WIDTH = "600";
    var LOCID_DEDUPE_WINDOW_HEIGHT = "520";
    var LOCID_EXPORT_WINDOW_WIDTH = "450";
    var LOCID_EXPORT_WINDOW_HEIGHT = "450";
    var LOCID_PRINT_WINDOW_WIDTH = "350";
    var LOCID_PRINT_WINDOW_HEIGHT = "300";
    var LOCID_GRID_SELECTED_ROW = "\u5df2\u9009\u4e2d\uff0c\u5355\u51fb\u5373\u53ef\u9884\u89c8";
    var LOCID_GRID_PREVIEW_ROW = "\u5355\u51fb\u6b64\u5904\u53ef\u7ed3\u675f\u9884\u89c8";
    var LOCID_GRID_UNSELECTED_ROW = "\u5355\u51fb\u6b64\u5904\u5373\u53ef\u9884\u89c8";
    var LOCID_ALT_COLUMNSORTORDER_DOWN = "\u6570\u636e\u6309\u964d\u5e8f\u5b58\u50a8\u5728\u8be5\u5217\u4e2d";
    var LOCID_ALT_COLUMNSORTORDER_UP = "\u6570\u636e\u6309\u5347\u5e8f\u5b58\u50a8\u5728\u8be5\u5217\u4e2d";
    var LOCID_UNRECOGNIZE_DOTC = "\x7b0\x7d \u4e0d\u662f\u53ef\u8bc6\u522b\u7684\u5bf9\u8c61\u7c7b\u578b\u3002";
    var LOCID_XML_PROCESS_ERROR = "\u5904\u7406\u60a8\u7684\u8bf7\u6c42\u65f6\u51fa\u9519\u3002\u8bf7\u7a0d\u5019\u518d\u91cd\u8bd5\u3002";
    var LOCID_POPUP_BLOCKER_ERROR = "Rca OA \u7a97\u53e3\u65e0\u6cd5\u6253\u5f00\uff0c\u53ef\u80fd\u5df2\u88ab\u5f39\u51fa\u7a97\u53e3\u963b\u6b62\u7a0b\u5e8f\u6240\u963b\u6b62\u3002\u8bf7\u5c06\u8fd9\u53f0 Rca OA \u670d\u52a1\u5668\u6dfb\u52a0\u5230\u60a8\u7684\u5f39\u51fa\u7a97\u53e3\u963b\u6b62\u7a0b\u5e8f\u5141\u8bb8\u6253\u5f00\u65b0\u7a97\u53e3\u7684\u7ad9\u70b9\u7684\u5217\u8868\u4e2d\x3a";
    var LOCID_BU_CANNOTDISABLE = "\u5df2\u68c0\u6d4b\u5230\u6b64\u64cd\u4f5c\u5c06\u505c\u7528\u6240\u6709\u5269\u4f59\u7684\u4e1a\u52a1\u90e8\u95e8\uff0c\u56e0\u6b64\u65e0\u6cd5\u7ee7\u7eed\u3002";
    var LOCID_DIALOG_OFFSET_WIDTH = "0";
    var LOCID_DIALOG_OFFSET_HEIGHT = "0";
    var LOCID_ERROR_DIALOG_WIDTH = "550";
    var LOCID_ERROR_DIALOG_HEIGHT = "260";
    var LOCID_CONTRACTS_TDIALOG_WIDTH = "350";
    var LOCID_CONTRACTS_TDIALOG_HEIGHT = "350";
    var LOCID_SEARCH_RESULTS = "\u641c\u7d22\u7ed3\u679c";
    var LOCID_SEARCH_ALERT_NO_CRITERIA = "\u6267\u884c\u641c\u7d22\u524d\u5fc5\u987b\u63d0\u4f9b\u67e5\u627e\u6761\u4ef6\u3002";
    var LOCID_SEARCH_LIST_NOT_OPEN = "\u5217\u8868\u6ca1\u6709\u5b8c\u6210\u6253\u5f00\u3002\u8bf7\u91cd\u8bd5\u60a8\u7684\u8bf7\u6c42\u3002";
    var LOCID_MAX_RECORDS_ERROR = "\u6700\u591a\u53ef\u4ee5\u9488\u5bf9\u6b64\u64cd\u4f5c\u9009\u62e9 10 \u6761\u8bb0\u5f55\u3002";
    var LOCID_ERROR_INVALID_VIEW = "\u6240\u9009\u89c6\u56fe\u7684\u5feb\u6377\u65b9\u5f0f\u4e0d\u53ef\u7528\u3002";
    var LOCID_FORMS_SAVE_CONFIRM_TITLE = "\u5c1a\u672a\u4fdd\u5b58\u6240\u505a\u7684\u66f4\u6539\u3002\u8981\u505c\u7559\u5728\u8be5\u9875\u9762\u4e0a\uff0c\u4ee5\u4fbf\u4fdd\u5b58\u6240\u505a\u7684\u66f4\u6539\uff0c\u8bf7\u5355\u51fb\u201c\u53d6\u6d88\u201d\u3002";
    var LOCID_FORM_PROIVE_VALUE_MASK = "\u5fc5\u987b\u63d0\u4f9b\x7b0\x7d\u7684\u503c\u3002";
    var LOCID_FORM_PRINT_DIRTY_MESSAGE = "\u6b64\u8868\u5355\u5df2\u66f4\u6539\uff0c\u6253\u5370\u4e4b\u524d\u5fc5\u987b\u8fdb\u884c\u4fdd\u5b58\u3002";
    var LOCID_LOOKUPSTYLE_NOT_SET = "\u672a\u77e5\u7684\u67e5\u627e\u6837\u5f0f\u3002\u8bf7\u68c0\u67e5\u5c5e\u6027 XML \u7684\u8bbe\u7f6e\u662f\u5426\u6b63\u786e\u3002";
    var LOCID_LOOKMORERECORDS_AMBIGUOUS = "\u67e5\u627e\u66f4\u591a\u8bb0\u5f55";
    var LOCID_LOOKUPAMBIGUOUSTITLE = "\u5df2\u627e\u5230\u591a\u4e2a\u5339\u914d\u9879\x3a";
    var LOCID_REMOTECOMMAND_ERROR = "\u53d1\u751f\u4e86\u9519\u8bef\u3002\u8bf7\u91cd\u8bd5\u6b64\u64cd\u4f5c\u3002\u5982\u679c\u95ee\u9898\u4ecd\u7136\u5b58\u5728\uff0c\u8bf7\u8bbf\u95ee Rca OA \u793e\u533a\u4ee5\u83b7\u53d6\u89e3\u51b3\u65b9\u6848\u6216\u8005\u4e0e\u60a8\u6240\u5728\u7ec4\u7ec7\u7684 Rca OA \u7ba1\u7406\u5458\u8054\u7cfb\u3002\u6700\u540e\uff0c\u60a8\u53ef\u4ee5\u4e0e Microsoft \u652f\u6301\u8054\u7cfb\u3002";

    var WEB_APP_URL = "";
    var HELP_SKU = "OP";
    var LOCID_GRID_NOT_FOUND = "\u65e0\u6cd5\u83b7\u53d6\u5bf9\u7f51\u683c\u7684\u5f15\u7528\u3002";
    var IS_LIVE = false;
    var IS_PATHBASEDURLS = true;
    var ORG_UNIQUE_NAME = "webs";
    var _ErrorCodesIsvAborted = "0x80040265";
    var ScriptErrorReportingPreference = 1;
    var ScriptErrorStatusBar = "\u7f51\u9875\u4e0a\u6709\u9519\u8bef\u3002";
    var _bPresenceEnabled = true;
    var ORG_DATE_FORMATSTRING = "yyyy\x2fM\x2fd";
    var ORG_IS_GREGORIANCALENDAR = false;
    var ORG_DATE_SEPARATOR = "-";
    var ORG_DATE_START_DAY = 0;
    var ORG_LANGUAGE_CODE = 2052;
    var ORG_NUMBER_FORMAT_MASK = "\x23,\x23\x230.\x2a\x3b\x7e\x23,\x23\x230.\x2a";
    var ORG_TIME_FORMAT = 0;
    var ORG_SHOW_WEEK_NUMBER = false;
    var ORG_NUMBER_DECIMAL_SEPARATOR = ".";
    var ORG_NUMBER_GROUP_SEPARATOR = ",";
    var SERVER_URL = "http\x3a\x2f\x2fhaocer-qb\x3a5555\x2fhaocer";
    var AUTHENTICATION_TYPE = 0;
    var CRM2007_WEBSERVICE_NS = "http\x3a\x2f\x2fschemas.microsoft.com\x2fcrm\x2f2007\x2fWebServices";
    var CRM2007_CORETYPES_NS = "http\x3a\x2f\x2fschemas.microsoft.com\x2fcrm\x2f2007\x2fCoreTypes";
    var ORG_TIMEZONE_OFFSET = 480;
    var USER_DATE_FORMATSTRING = "yyyy\x2fM\x2fd";
    var USER_IS_GREGORIANCALENDAR = true;
    var USER_DATE_SEPARATOR = "-";
    var USER_DATE_FORMATTED_FORMATSTRING = "yyyy\x2fM\x2fd";
    var DEFAULT_USER_NUMBER_FORMAT_MASK = "\x23,\x23\x230.\x2a\x3b\x7e\x23,\x23\x230.\x2a";
    var USER_LANGUAGE_CODE = 2052;
    var USER_HELP_LCID = "2052";
    var USER_NUMBER_FORMAT_MASK = "\x23,\x23\x230.\x2a\x3b\x7e\x23,\x23\x230.\x2a";
    var USER_TIME_FORMAT = "H\x3amm";
    var USER_SHOW_WEEK_NUMBER = false;
    var USER_NUMBER_DECIMAL_SEPARATOR = ".";
    var USER_NUMBER_GROUP_SEPARATOR = ",";
    var HELP_SERVER_URL = "";
    </script>

    <script type="text/javascript" src="../_static/_common/scripts/encodedecode.js"></script>

    <script type="text/javascript" src="../_static/_controls/util/util.js"></script>

    <script type="text/javascript" src="../_static/_common/scripts/global.js"></script>

    <script type="text/javascript" src="../_static/_common/scripts/xmlutil.js"></script>

    <script type="text/javascript" src="../_static/_controls/remotecommands/remotecommand.js"></script>

    <script type="text/javascript" src="../_common/windowinformation/windowinformation.js"></script>

    <script type="text/javascript" src="../_static/_common/scripts/stage.js"></script>

    <script type="text/javascript" src="../_static/_grid/action.js"></script>

    <script type="text/javascript" src="../_static/_jQuery/jquery-1.3.2.min.js"></script>

    <script language="javascript" src="../_static/_jQuery/jquery_json.js" type="text/javascript"></script>

    <script language="javascript" src="../_static/_jQuery/jquery_stringutil.js" type="text/javascript"></script>

    <link rel="stylesheet" type="text/css" href="../_common/styles/global.css" />
    <link rel="stylesheet" type="text/css" href="../_common/styles/global-styles.css" />
    <link rel="stylesheet" type="text/css" href="../_common/styles/global-dynamic-styles.css" />
    <link rel="stylesheet" type="text/css" href="../_common/styles/fonts.css" />
    <link rel="stylesheet" type="text/css" href="../_forms/controls/controls.css" />
    <link rel="stylesheet" type="text/css" href="../_common/styles/select.css" />
    <link rel="stylesheet" type="text/css" href="../_nav/menu.css" />
    <link rel="stylesheet" type="text/css" href="../_controls/notifications/notifications.css" />
    <link rel="stylesheet" type="text/css" href="../_grid/appgrid.css" />

    <script language="JavaScript" type="text/javascript">
    function window.onload()
    {
	    LoadingData();
	    LoadFunctionDataList();
    }
    var pageIndex = "";
    function pagination(index)
    {
        pageIndex = index;
        LoadingData();
    }
    function LoadingData()
    {
        $.ajax({
               type:    "POST",
               url:     "sysrightsmaglist.aspx",
               data:    {
                        otype:            "loaddata",
                        index:            pageIndex,
                        categoryid:       $("#dropCategory").val(),
                        functionid:       $("#txtFunctionId").val()
               },
               beforeSend:function(){
                    $("#divloading").css("display","block");
                    $("#divItemsList").html('');
               },
               success: function(res, textStatus){
                    $("#divloading").css("display","none");
                    $("#divItemsList").html(res);
               }
          }); 
    }
	function LoadFunctionDataList()
	{
	    if($("#dropCategory").val() != "")
	    {
	        $.ajax({
                async   :   false,
                type    :   "POST",
                url     :   "sysrightsmaglist.aspx",
                data    :   { otype : "getfunctionlist", categoryid : $("#dropCategory").val() },
                success :   function(data, textStatus) {
                    $("#drplFunctions").emptySelect().append(data).change(function() {
                        $("#txtFunctionId").val($("#drplFunctions").val());
                    });
                }
            });
        }
        else
        {
            $("#drplFunctions").emptySelect().append("<option value=''>-- 全部 --</option>");
            $("#txtFunctionId").val($("#selCategoryList").val());
        }
	}
    /// 弹出网页对话框
    function OpenDia(otype)
    {
        switch(otype)
        {
             case "add":
                openStdDlg(prependOrgName("/admin/system/sysrightseditor.aspx?otype=add"), window, 520, 320, true);
                break;
             case "modify":
                var oTr = getSelectedOTr("crmGrid", getSelected("crmGrid")[0]);
                if(oTr)
                {
                    openStdDlg(prependOrgName("/admin/system/sysrightseditor.aspx?privilegeid=" + oTr.oid + "&otype=modify"), window, 520, 320, true);
                }
                else
                {
                    alert("请先选中记录!");
                }
                break;
        }
    }
    ///删除
    function Delete()
    {
	    var oTr = getSelectedOTr("crmGrid", getSelected("crmGrid")[0]);
        if(oTr)
        {
            if(confirm("您确定要删除所选记录吗?"))
            {
                  $.post(
                       "sysrightsmaglist.aspx",
                       {    
                            otype:          'delete',
                            privilegeid:     oTr.oid
                       },
                       function(res){        
                            if (res == "succeeded")
                            {
                                res = "Delete successfull!";
                                LoadingData();
                            }
                            else
                                alert(res);
                       }
                  );
              }
        }
        else
           alert("请先选中模块记录!");
    }
    ///查询
    function Lookup()
    {
        pageIndex = "";
        LoadingData();
    }

    </script>

    <style type="text/css">
        .navArea
        {
            background: url(   '../../website_admin/_imgs/admin/tab/tab_05_1.gif' ) repeat-x;
            width: 100%;
            height: 32px;
            line-height: 32px;
        }
        .navBar
        {
            background: url(   '../../website_admin/_imgs/admin/tab/tb.gif' ) no-repeat 12px;
            border-bottom: #dddddd 1px solid;
            padding-left: 32px;
            width: 100%;
        }
    </style>
</head>
<body class="stage">
    <form id="form1" runat="server">
    <table class="stdTable" cellspacing="0" cellpadding="0">
        <colgroup>
            <col />
        </colgroup>
        <tr>
            <td class="navArea">
                <div class="navBar">
                    <uc1:ctlnavbar id="CtlNavBar1" runat="server" />
                </div>
            </td>
        </tr>
        <tr class="ms-crm-Form-Background" height="100%">
            <td id="tdAreas" style="padding: 0px 5px 5px 5px;">
                <table class="stdTable" cellpadding="0" cellspacing="0">
                    <colgroup>
                        <col />
                    </colgroup>
                    <tr height="34">
                        <td>
                            <table class="home_activities_table_TypeSel" cellspacing="0" cellpadding="0" width="100%">
                                <colgroup>
                                    <col width="60" />
                                    <col width="200" />
                                    <col width="60" />
                                    <col width="200" />
                                    <col />
                                </colgroup>
                                <tbody>
                                    <tr style="padding-bottom: 5px">
                                        <td class="home_activities_td_ViewSelLbl" nowrap>
                                            <span style="font-weight: bold; color: #666666">模块类别:</span>
                                        </td>
                                        <td class="home_activities_td_ViewSel">
                                            <asp:DropDownList ID="dropCategory" runat="server" CssClass="ms-crm-SelectBox">
                                            </asp:DropDownList>
                                        </td>
                                        <td class="home_activities_td_ViewSelLbl" nowrap>
                                            <span style="font-weight: bold; color: #666666">模块类别:</span>
                                        </td>
                                        <td class="home_activities_td_ViewSel">
                                            <asp:DropDownList ID="drplFunctions" runat="server" CssClass="ms-crm-SelectBox">
                                            </asp:DropDownList>
                                            <input id="txtFunctionId" type="text" style="display: none;" />
                                        </td>
                                        <td class="home_activities_td_QuickFind" colspan="2">
                                            <button class="ms-crm-Button" onclick="Lookup();" tabindex="5">
                                                搜索</button>
                                        </td>
                                    </tr>
                                    <tr style="display: none; padding-bottom: 5px">
                                    </tr>
                                </tbody>
                            </table>
                        </td>
                    </tr>
                    <tr height="25">
                        <td>
                            <span id="crmMenuBar">
                                <table cellspacing="0" cellpadding="0" width="100%">
                                    <tbody>
                                        <tr>
                                            <td>
                                                <table class="ms-crm-ActionBar" id="mnuBar1" cellspacing="0" cellpadding="0">
                                                    <tbody>
                                                        <tr>
                                                            <td class="ms-crm-MenuBar-Items" nowrap align="right">
                                                                <ul class="ms-crm-MenuBar-Left">
                                                                    <li class="ms-crm-Menu" id="_MBCreateNew" title="新增" onclick="window.execScript(action)"
                                                                        tabindex="-1" action="OpenDia('add');"><span class="ms-crm-Menu-Label"><a class="ms-crm-Menu-Label"
                                                                            onclick="return false;" tabindex="-1" href="javascript:onclick();" target="_self">
                                                                            <img class="ms-crm-Menu-ButtonFirst" tabindex="-1" alt="新增" src="../_imgs/ico_16_4200_d.gif"><span
                                                                                class="ms-crm-MenuItem-TextRTL" tabindex="0">新增</span></a></span></li>
                                                                    <li class="ms-crm-Menu-Spacer" tabindex="-1">&nbsp;<img id="mnu_hSpacerGrid" style="background-position-y: -55px;
                                                                        background-image: url(../_imgs/imagestrips/control_imgs_1.gif); width: 4px; clip: rect(0px 4px 17px 0px);
                                                                        height: 17px" alt="" src="../_imgs/imagestrips/transparent_spacer.gif">&nbsp;</li>
                                                                    <li class="ms-crm-Menu" id="_MBdoActioncrmGrid8delete" title="删除" onclick="window.execScript(action)"
                                                                        tabindex="-1" action="Delete();"><span class="ms-crm-Menu-Label"><a class="ms-crm-Menu-Label"
                                                                            onclick="return false;" tabindex="-1" href="javascript:onclick();" target="_self">
                                                                            <img class="ms-crm-Menu-ButtonFirst" id="ico_16_delete" style="background-position-y: -121px;
                                                                                background-image: url(../_imgs/imagestrips/grid_ctrl_imgs.gif); width: 16px;
                                                                                clip: rect(0px 16px 16px 0px); height: 16px" tabindex="0" alt="删除" src="../_imgs/imagestrips/transparent_spacer.gif"></a></span></li>
                                                                </ul>
                                                            </td>
                                                            <td class="ms-crm-MenuBar-Items ms-crm-Menu-ICRight" nowrap>
                                                                <ul class="ms-crm-MenuBar-Right">
                                                                </ul>
                                                            </td>
                                                        </tr>
                                                    </tbody>
                                                </table>
                                            </td>
                                        </tr>
                                    </tbody>
                                </table>
                            </span>
                        </td>
                    </tr>
                    <tr>
                        <td>
                            <div id="divloading" style="display: none;">
                                <table class='stdTable' style='background-color: #FFFFFF; border: solid 1px #6699CC;'
                                    cellpadding="0" cellspacing="0">
                                    <tr>
                                        <td style='vertical-align: middle' align='center'>
                                            <img alt='' src='../_imgs/AdvFind/progress.gif'><br>
                                            加载数据 ...
                                        </td>
                                    </tr>
                                </table>
                            </div>
                            <div id="divItemsList">
                            </div>
                        </td>
                    </tr>
                </table>
            </td>
        </tr>
    </table>
    </form>
</body>
</html>
